home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / gds / source / gds105.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  905 b   |  41 lines

  1.  
  2. /*
  3.  *
  4.  *    GDS105 : ドットデ-タの書き込み
  5.  *
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10.  
  11. unsigned int GDS_put_block(unsigned char *data,signed int x1,signed int y1,signed int x2,signed int y2,unsigned char page,unsigned char mode) {
  12.    union  REGS  inregs, outregs;
  13.    struct SREGS segregs;
  14.    static struct {
  15.       unsigned int offset;
  16.       unsigned int segment;
  17.       unsigned char page;
  18.       unsigned char dust;
  19.       signed int x1;
  20.       signed int y1;
  21.       signed int x2;
  22.       signed int y2;
  23.    } work;
  24.  
  25.    work.offset=(unsigned int)data;
  26.    work.segment=_DS;
  27.    work.page=page;
  28.    work.dust=0;
  29.    work.x1=x1;
  30.    work.y1=y1;
  31.    work.x2=x2;
  32.    work.y2=y2;
  33.    segread(&segregs);
  34.    segregs.ds=_DS;
  35.    inregs.x.di=(unsigned int)&work;
  36.    inregs.h.ah=0x86;
  37.    inregs.h.al=mode;
  38.    int86x(0x92,&inregs,&outregs,&segregs);
  39.    return (unsigned int)outregs.h.ah;
  40. }
  41.